<?php
class model_CommentModel {
    private $id;
    private $parentId;
    private $text;
    private $author;
    private $date;

    public function  __construct($row = null) {
        if (null != $row){
        $this->setId($row['id'])
                ->setParentId($row['parentid'])
                ->setText($row['text'])
                ->setAuthor($row['author'])
                ->setDate($row['date']);
        }
    }

    public  function setId($id) {
        $this->id = $id;
        return $this;
    }

    public  function getId() {
        return $this->id;
    }

    public  function setParentId($parentid) {
        $this->parentId = $parentid;
        return $this;
    }

    public  function getParentId() {
        return $this->parentId;
    }

    public  function setAuthor($author) {
        $this->author = $author;
        return $this;
    }

    public  function getAuthor() {
        return $this->author;
    }

    public  function setText($text) {
        $this->text = $text;
        return $this;
    }

    public function getText() {
        return $this->text;
    }

    public  function setDate($date) {
        $this->date = $date;
        return $this;
    }

    public  function getDate() {
        return $this->date;
    }
}